/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** vehicle新增 POST /api/vehicle/add */
export async function addUsingPost3({
  body,
  options,
}: {
  body: API.vehiclechuangjiancanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/vehicle/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** vehicle删除 POST /api/vehicle/del */
export async function delUsingPost3({
  body,
  options,
}: {
  body: API.IDcanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/vehicle/del', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** vehicle详情 GET /api/vehicle/detail */
export async function detailUsingGet6({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.detailUsingGET6Params;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultvehiclexiangqingVo>('/api/vehicle/detail', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** vehicle编辑 POST /api/vehicle/edit */
export async function editUsingPost3({
  body,
  options,
}: {
  body: API.vehiclegengxincanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/vehicle/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** vehicle列表 GET /api/vehicle/list */
export async function listUsingGet7({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.listUsingGET7Params;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultPageResultvehicleliebiaoVo>(
    '/api/vehicle/list',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** vehicle列表 GET /api/vehicle/listAll */
export async function listAllUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.listAllUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultListvehicleliebiaoVo>('/api/vehicle/listAll', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
